Rating Services

Rating service calculates the AP/RP. Based on the inputs provided, it picks up the appropriate rate plan and executes it. It returns the final premiums as well as other intermediate values(rates and other loading factors) derived during the execution of premium computations.

 

getRate

Service Name

getRate

Service Description

This service resolves the appropriate plan for the given product and executes it. Based on the input transaction type, this service calculates Annual Premium (AP) and Return Premiums (RP). The service can also return the step by step execution trace of the complete premium computation logic for debugging.

Input

Product Name, Risks, Coverages, Forms, State, Transaction type, Effective date and Request Id(optional)

Note:

  • Service doesn’t enforce strict sequencing of xml elements

  • Service ignores the invalid elements(not part of BOM) sent in the request

Sample Input XML

To view a sample XML input file, referRatingServiceRequest.xml.

Output

Product Name, Risks, Coverages, Forms with computed premiums.

Sample Output XML

To view a sample XML output file, referRatingServiceResponse.xml

Schema

To view a sample output of Product Services schema, referRatingService.xsd

REST URL

Verb: POST ; Consumes: text/xml ; Produces: text/xml http://host:port/ifoundry/api/v1/rating/rate?requestId={requestId}

Mandatory/Optional fields in Rating Request

context (Element under ‘request’)

Elements under Context

Description

Mandatory/Optional

Product

Product name

Mandatory

testbed

Testbed name

Optional (mandatory for testbed testing)

enableTrace

To get execution trace in response. Should be set to false in production environments

Mandatory

ratingWorkSheet

To get rating worksheet trace in response, by default it is "false".

Optional

Policy (Element under ‘request’) 

 

Namespace: "http://www.valuemomentum.com/iFoundry/common/{product name}"

Elements under Policy

Description

Mandatory/Optional

EffectiveDate

Effective date

Mandatory

EffDate

Policy effective date

Mandatory

ExpDate

Policy expiry date

Mandatory

TransactionType

transaction type

Mandatory

State

 

Mandatory 

State, Carrier & EffectiveDate are optional for Testbed requests.

Context (Element under ‘Policy’) required for ERC Request

 

Elements under context

 

Description

 

Mandatory/Optional

IsPremiumCalculation

Flag used to execute premium computations value should be set to “Yes”

Mandatory for ISO ERC models

Service does not enforce strict sequencing of elements.

Additional elements sent in the request that are not part of product model(BOM) will be ignored.

 

getRate

Service Name

getRate

Service Description

This service resolves the appropriate plan for the given product and executes it. Based on the input transaction type, this service calculates Annual Premium (AP) and Return Premiums (RP). The service can also return the step by step execution trace of the complete premium computation logic for debugging.

 

Input

Product Name, Risks, RiskExtensions, Coverages, Forms, Endorsements, Schedules, State, Country, Carrier, TransactionDate, Transaction type, Effective date, Expiry date, PlanDeterminationFactors, and Request Id (Optional)

Refer: RatingRequest

Sample Input XML

To view a sample XML input file, referRatingRequestServiceRequest.xml.

Output

 

Refer: RatingResponse

Sample Output XML

To view a sample XML output file, referRatingResponseServiceResponse.xml

Schema

To view a sample output of Product Services schema, referRatingService.xsd

REST URL

Verb: POST ; Consumes: xml, json; Produces: xml, json http://host:port/ifoundry/api/v1/rating/rateObject?requestId={requestId}

Rating service schema generation

The input format for rating service is XML. The request XML generated by the calling application should comply with iFoundry rating service schema, which also includes reference to the BOM schema extracted from getBOM service.

To view the sample rating service schema, refer toSchemas.zip in the release folder.

Below are the steps to generate rating service schema for a specific product:

  1. Extract Rating BOM schema from getBOM metadata service

  2. Import the product model xsd into the Rating Service xsd. Below is the sample snippet of the schema

 <?xml version="1.0" encoding="utf-8"?>

    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"     xmlns:rtgService="http://www.valuemomentum.com/iFoundry"       xmlns:mdl="http://www.valuemomentum.com/iFoundry/common/commercialautomobile"

targetNamespace="http://www.valuemomentum.com/iFoundry"

    elementFormDefault="qualified" attributeFormDefault="unqualified">

    <xsd:include schemaLocation="CommonService.xsd"/>     <xsd:import schemaLocation="ProductModel.xsd"     namespace="http://www.valuemomentum.com/iFoundry/common/commercialautomobile" />

    <xsd:include schemaLocation="ExpressionTrace.xsd"/>

  1. The request and response complex types (ratingDetailsRequestInfo, ratingDetailsResponseInfo) should be referring to the root element i.e., “Policy” in the product model schema extracted using getBOM service. Below is the sample snippet of the schema.

<xsd:complexType name="ratingDetailsResponseInfo">        <xsd:complexContent>

<xsd:extension base="rtgService:serviceResponse">

      <xsd:sequence minOccurs="0">

         <xsd:element name="context" type="rtgService:contextInfo"/>

         <!-- Root element name from Product BOM schema - ProductModel.xsd -->

              <xsd:element ref="mdl:Policy"/>

               <xsd:element name="trace" type="rtgService:traceInfo"  minOccurs="0"/>

               <xsd:element name="ratingws" type="rtgService:ratingwsInfo"  minOccurs="0"/>

         </xsd:sequence>

</xsd:extension>

      </xsd:complexContent>

</xsd:complexType>

 

Below is the snapshot of the rating service schema.

Product model schema needs to be updated whenever new attributes, risk, coverages,forms are added.

Error Messages

The below table provides the list of error messages with the reason and solution to fix it.

Error Code

Error Message

Reason

Resolution

6001

Unable to execute : Rates are not defined for the inputs <input1 name = input1 value, input2 name = input2 value> for the

Rate table '<table name>'

If there output are not defined for the required inputs

Change the Input values for mentioned attributes and execute again.

Look at the table in the plan design for the rate combinations defined in the workbench if additional combinations needs to be added add the data and publish again to execute

6002

Unable to execute:  Error occurred while retrieving/creating rates for Rate table '<table name>' at runtime. Contact system administrator

lookup exceptions other than input mismatch or when schema not found in

Pricing database

Contact system administrator

6003

Unable to execute : Rates not found for Rate table '<table name>'  for the dimension :-

'<dimension name>'  and value:-'<dimension value>'

Rate data not found for the configured dimension value(s)

Check if the rate data is defined for the given dimension values, if data is configured contact system administrator

6004

Unable to execute : Rate table <table name>' not found in the plan 

If rate / lookup table does not exists in the plan

Check if lookup /rate table is defined in the plan, if configured and rates and still you are facing the issue contact system administrator

6006

Unable to execute : No plan was found for the given determination parameters <parameter name1> = '<parameter value1>', <parameter name2> = '<parameter value2>'

No plan found for given

Plan determination values

Check the plan determination values in the request and see if the same has plans mapped in the launch module. If you find the plans launched for given determination values contact system administrator

6011

Unable to execute : <type> '<name>' was not found for dimension :-

No algorithm found for the dimension values

Check if the algorithm is defined in the plan design for the attributes mentioned in the error message.

 

'<dimension name>'  and value:-'<dimension value>' 

 

If not configured, define the algorithm with same name, publish and execute again. If configured and still facing same issue, contact system administrator

6014

Unable to execute: 

Internal server error. Contact system administrator

Internal server errors

Contact system administrator

6023

Unable to execute : Algorithm '<algorithm name>' not found in plan

If  algorithm is not found in the plan

Check if the algorithm is defined in the plan. If designed contact system administrator. If not configured, define the algorithm with same name, publish and execute again. If configured and still facing same issue, contact system administrator

6040

Unable to execute :

No product found with

'<product name>'

Product is not found with mentioned name

Correct the product name in the request and execute again.

If you find product name to be correct, contact system administrator

6046

Unable to execute : Product model not found for the product '<product name>' and testbed '<testbed name>'

Rated structure (BOM) is not found for given product and testbed OR when no product or testbed available in the connected server database

Check if rated structure was properly published at runtime (server database) or check if product name or testbed names are properly configured in the test case. If you find them to be correct, contact system administrator

6047

Unable to execute :  Error in loading Product model for product '<product name>'

'<dimension name>'  and value:-'<dimension value>' 

Exception occurs when trying to load BOM

Check if stage folder is available in the server instance in the below path 

iFoundryServer\IF\IF4Server  If it is found, ensure file write permissions are given.

If not configured, define the algorithm with same name, publish and execute again. If configured and still facing same issue, contact system administrator

6014

Unable to execute: 

Internal server error. Contact system administrator

Internal server errors

Contact system administrator

6023

Unable to execute : Algorithm '<algorithm name>' not found in plan

If  algorithm is not found in the plan

Check if the algorithm is defined in the plan. If designed contact system administrator. If not configured, define the algorithm with same name, publish and execute again. If configured and still facing same issue, contact system administrator

6040

Unable to execute :

No product found with

'<product name>'

Product is not found with mentioned name

Correct the product name in the request and execute again.

If you find product name to be correct, contact system administrator

6046

Unable to execute : Product model not found for the product '<product name>' and testbed '<testbed name>'

Rated structure (BOM) is not found for given product and testbed OR when no product or testbed available in the connected server database

Check if rated structure was properly published at runtime (server database) or check if product name or testbed names are properly configured in the test case. If you find them to be correct, contact system administrator

6047

Unable to execute :  Error in loading Product model for product '<product name>'

Exception occurs when trying to load BOM

Check if stage folder is available in the server instance in the below path 

iFoundryServer\IF\IF4Server  If it is found, ensure file write permissions are given.

6051

Unable to execute :

Error occurred while loading <type>

'<name>'.Contact system administrator

Algorithms errors

Validate the algorithm in plan design. Potentially, it could be data type mismatches, missing rule block definitions or syntactical errors. Contact system administrator for more details

6062

Unable to execute: 

Invalid date format for 'effective date'. Once you provide the input in valid XML date format, you will be able to proceed

Effective date provided is

not a valid XML date format (YYYY-MMDDT00:00:00)

Check if effective date is in valid XML date format, If it is not in valid format correct it and execute again

6067

Unable to execute : No plan was found for product '<product name>' and testbed '<testbed name>'

Plan not available for given product and testbed

Check if the plan is published  to the environment against which the request is being executed Contact system administrator for more details

6068

Unable to execute : Error in creating response for product '<product name>'.Contact system administrator

Error in validating the rated structure (response does not matches with product model)

 contact system administrator

6069

Unable to execute:  Invalid request format / inputs. Once you provide valid inputs for the attributes or rectify the request format you will be able to proceed.

Error in validating rated structure (request does not matches with product model)

Check if request is in valid format (hierarchy) or the inputs provided to specified attributes are of right data type. If everything looks to be right contact system administrator

6070

Unable to execute :

Request is not in a valid

XML format

Request is not in valid XML format

Check request xml is in valid format or not

6072

Unable to execute : Product model was not found for the product '<product name>'

 

Rated structure is not available for given product name OR there is no product available in the connected server database

Check if rated structure was properly published at runtime (server database) or check if product name is properly configured in the test case. If both are correct contact system administrator

6073

Unable to execute : Effective date is mandatory, you will be able to proceed once effective date is provided

Effective Date is not provided

Check if effective date is provided in the test case

6076

Unable to execute : Context mismatch for algorithm <algorithm name>' : expected - '<expected argument>' ,

actual - '<actual argument>'

If the inputs passed in the pricer(in invoke statement) are not matching with context parameters defined in the algorithm.

Check in the plan design if the context parameters of the algorithm is same as the parameters passed in invoke statement in pricer.

6078

Unable to execute :

Testbed <testbed name>' not found for the product

'<product name>' in the

PricingDatabase

If a new server instance is created by connecting to an existing server repository and not copying the relevant pricing database script

Contact system administrator

6079

Unable to execute : No product found with the name '<product name>' in the PricingDatabase

If a new server instance is created by connecting to an existing server repository and not copying the relevant pricing database script

Contact system administrator

6080

Unable to execute : No Rate table found with the name '<table name>' for the product '<product name>' in the PricingDatabase

If a new server instance is created by connecting to an existing server repository and not copying the relevant pricing database script

Contact system administrator

6081

Unable to execute : Override failed: Override premium is not compliant with minimum premiums

Unable to apportion premiums due to minimum premium conditions

Increase the override premium so that minimum premium conditions doesn’t fail

6082

Override premium is mandatory when override premium indicator is 1

If Override premium indicator is passing in request then it is mandatory to send Override premium

 

6083

Effective Date is mandatory for globalLookup or globalFormula, DisplayName

Effective Date is mandatory

For globalLookup and globalFormula

 

6084

Dimension '<element>' not found

Dimension element is missing

 

6085

Dimension '<value>' is mandatory

Dimension ‘value’ is missing

 

6086

Lookup input columns mismatch for lookupType 'lookupDisplayName',Actual : {3}, Expected : {4}

Input columns mismatch

 

5008

Unable to execute:

Data is not defined for the

<type> '<name>'

If data is not defined for given algorithm/ratetable

Check if the data exists for specified<type> in plan. If data

exists Contact system administrator